<%--
  Created by IntelliJ IDEA.
  User: wsx
  Date: 2017/5/12
  Time: 20:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/header.jsp"%>
<html>
<head>
    <title>申请换货</title>
    <link rel="stylesheet" href="${Layui}/css/layui.css" media="all">
    <script src="${Layui}/layui.js" charset="utf-8"></script>
    <script src="${jquery}/jquery-3.1.1.js" charset="utf-8"></script>
    <script src="${Js}/admin/changegoods.js" charset="utf-8"></script>
</head>
<body style="margin-left:2px">
<input type="text" value="${pageIndex}" hidden id="pageIndex">
<input type="text" value="${pageCount}" hidden id="pageCount">
<input type="text" value='${jsonObject}' hidden id="jsonObject">
<br>
<br>
<form class="layui-form" action="/admin/findchangegoods" method="post">
    <div class="layui-form-item">
        <div class="layui-inline" >
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-inline" >
                <input type="text" name="croChangegoodsVo.username" placeholder="请输入用户名" autocomplete="off" class="layui-input" value="${recorCroChangegoodsvo.username}">
            </div>
        </div>
        <div class="layui-inline" >
            <label class="layui-form-label">订单编号</label>
            <div class="layui-input-inline">
                <input type="text" value="${recorCroChangegoodsvo.purchaseid}" name="croChangegoodsVo.purchaseid" placeholder="请输入订单编号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline"  >
            <label class="layui-form-label">申请状态</label>
            <div class="layui-input-block">
                <select name="croChangegoodsVo.changeStatus" lay-verify="required">
                    <option value="-1" selected >选择申请状态</option>
                    <c:forEach items="${SysDict['change_status']}" var="status">
                        <c:if test="${recorCroChangegoodsvo.changeStatus==status.key}">
                            <option value="${status.key}" selected>${status.value}</option>
                        </c:if>
                        <c:if test="${recorCroChangegoodsvo.changeStatus!=status.key}">
                            <option value="${status.key}">${status.value}</option>
                        </c:if>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
        </div>
    </div>
</form>
<table class="layui-table" lay-even="" lay-skin="row">
    <colgroup>
        <col width="5%">
        <col width="15%">
        <col width="15%">
        <col width="15%">
        <col width="15%">
        <col width="15%">
        <col width="10%">
        <col width="15%">

    </colgroup>
    <thead>
    <tr>
        <th>序号</th>
        <th>订单号</th>
        <th>申请人的名字</th>
        <th>换货的商品</th>
        <th>申请日期</th>
        <th>申请的理由</th>
        <th>申请状态</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:set var="i" value="${0}" />
    <c:forEach items="${croChangegoodsList}" var="croChangegoods">
        <tr>
            <c:set var="i" value="${i+1}" />
            <td>${i}</td>
            <td>${croChangegoods.croPurchase.id}</td>
            <td>${croChangegoods.croPurchase.croCustomer.username}</td>
            <td>${croChangegoods.croPurgoods.goodname}</td>
            <td>${croChangegoods.applydate}</td>
            <td>${croChangegoods.changereson}</td>
            <td>${SysDict['change_status'][croChangegoods.change_status]}</td>
            <td>
                <div class="layui-btn-group">
                    <a class="layui-btn layui-btn-primary layui-btn-small edit" data-method="detail" id="${croChangegoods.id}">
                        <i class="layui-icon">&#xe642;</i>
                    </a>
                    <a class="layui-btn layui-btn-primary layui-btn-small delete" data-method="delete" id="${croChangegoods.id}">
                        <i class="layui-icon">&#xe640;</i>
                    </a>
                </div>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div id="fullpage"></div>

</body>
</html>
